import Home from '@/views/Home'
import MyFooter from '@/components/MyFooter'
const Mall = () => import('@/views/Mall')
const Cart = () => import('@/views/Cart')
const Mine = () => import('@/views/Mine')
const CateList = () => import('@/views/CateList')
const Detail = () => import('@/views/Detail')

export default [
  {
    path: '/',
    redirect: '/home',
    meta: {
      isTabbar: false
    }
  },
  {
    path: '/home',
    name: 'home',
    components: {
      default: Home,
      footer: MyFooter
    },
    meta: {
      isTabbar: true,
      title: '首页',
      iconf: '&#xe619;'
    }
  },
  {
    path: '/mall',
    name: 'mall',
    components: {
      default: Mall,
      footer: MyFooter
    },
    meta: {
      isTabbar: true,
      title: '商城',
      iconf: '&#xe61a;'
    },
    children: [
      {
        path: ':cateId',
        component: CateList
      }
    ]
  },
  {
    path: '/cart',
    name: 'cart',
    components: {
      default: Cart,
      footer: MyFooter
    },
    meta: {
      isTabbar: true,
      title: '购物车',
      iconf: '&#xe61b;'
    }
  },
  {
    path: '/mine',
    name: 'mine',
    components: {
      default: Mine,
      footer: MyFooter
    },
    meta: {
      isTabbar: true,
      title: '我的',
      iconf: '&#xe61c;'
    }
  },
  {
    path: '/detail',
    name: 'detail',
    component: Detail,
    meta: {
      isTabbar: false
    }
  }
]
